package com.pug.job.task;

import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.time.LocalDateTime;

/**
 * @author RenGaoshuai
 * @date 2023/7/5 14:25
 * @description Quartz定时任务组件
 */
@Slf4j
public class QuartzJobPrintOutTask extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        log.info("=======>QuartzJob定时任务执行开始，当前时间：" + LocalDateTime.now());
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("QuartzJob任务执行中------");
        log.info("=======>QuartzJob定时任务执行结束，当前时间：" + LocalDateTime.now());
    }
}
